/**
 * Creat with IntelliJ IDEA
 * Description:测试图书管理系统
 * User:WZW
 * Date:2021-11-27
 * Time:17:39
 */
import BOOK.*;
import User.*;

import java.util.Scanner;

public class TestDemo {
    public static void main(String[] args) {
        BookList bookList = new BookList();
        Scanner scanner = new Scanner(System.in);
        System.out.println("*****欢迎来到图书管理系统！*****");
        System.out.print("请输入您的用户名：>");
        String name = scanner.nextLine();
        System.out.print("Hello!"+name+"，请输入您的身份：>(0.管理员 1.读者)");
        User user;
        if(scanner.nextInt()==0){
            user = new Administrators(name);
        }else {
            user = new Reader(name);
        }
        while (true){
            int choice = user.menu();
            user.doWork(choice,bookList);
        }
    }
}
